<?php

class Core_Model_Customer_Map extends Dcmp_Model_Status {

    public function __construct() {
        parent::__construct();
    }

    protected function getTableClass() {
        return Kd_Loader::loadClass('table_customer_map');
    }

    protected function initializeTable($table) {
        $table->setName('{t}customer_map');
        $table->createColumn('id', 'integer', TRUE, TRUE);
        $table->createColumn('balloon_image', 'string');
        $table->createColumn('window_template', 'string');
        $table->createColumn('poi_id', 'string')->setUpdateable(FALSE);
        parent::initializeTable($table);
    }

    public function loadByPoi($poi) {
        $this->fill($this->getTable()->getByPoi($poi));
        return $this;
    }
}